import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:whale/helper/utils/util.dart';

import '../../../app_tab/controller.dart';

class HomeTitleWidget extends StatelessWidget {
  const HomeTitleWidget({Key? key}) : super(key: key);


  @override
  Widget build(BuildContext context) {
    final tabState = Get.find<AppTabController>().state;
    return SafeArea(
        child: Container(
      // color: TopColors.main_color,
      margin: EdgeInsets.only(top: 20.r),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          SizedBox(
            width: 15.r,
          ),
          Image.asset(
            'assets/images/home/icon_app_logo.png',
            width: 44.r,
            height: 44.r,
          ),
          SizedBox(
            width: 15.r,
          ),
          Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text(
                '观市',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 20.sp,
                  fontWeight: FontWeight.w800,
                ),
              ),
              SizedBox(
                height: 7.r,
              ),
              Text(
                '助力全国统一大市场',
                style: TextStyle(
                  color: Colors.white,
                  fontSize: 12.sp,
                  fontWeight: FontWeight.w600,
                ),
              ),
            ],
          ),
          Spacer(),
          GestureDetector(
            onTap: () => Get.toNamed(RouterPath.qrcodeView),
            child: Container(
              key: tabState.intro.keys[0],
              margin: EdgeInsets.only(right: 30.r),
              child: Image.asset(
                'icon_saoyisao.png'.imgPathHome,
                width: 23.5.r,
                height: 23.5.r,
              ),
            ),
          )
        ],
      ),
    ));
  }
}
